@import 'src/components/naiveui/styles/scrollbar.less';
@import 'src/components/naiveui/styles/table.less';
@primary-color: #18a058;
@primary-background-color: #eafaef;
// Color variables (appears count calculates by raw css)
@color0: #ffffff; // Appears 15 times
@color1: #18a058; // Appears 9 times
@color2: #f0a020; // Appears 7 times
@color3: #e4e7ed; // Appears 3 times
@color4: #f4f6fc; // Appears 3 times
@color5: #e1e1e1; // Appears 3 times
@color6: #e0e0e0; // Appears 2 times
@color7: #fafafa; // Appears 2 times
@color8: #cccccc; // Appears 2 times


// Height variables (appears count calculates by raw css)
@height1: calc(100% - 45px); // Appears 2 times
@height2: 100%; // Appears 9 times
@height3: 45px; // Appears 3 times
@height4: 28px; // Appears 4 times
@height8: 3px; // Appears 3 times

html {
  height: @height2;
  margin: 0;
}
body {
  height: @height2;
  margin: 0;
  /* 文字不可选中 */
  -webkit-user-select:none;
  -moz-user-select:none;
  -ms-user-select:none;
  user-select:none;
}
#app {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  color: #2c3e50;
  font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
  height: @height2;
  min-height: @height2;
}
.fc-style {
  height: @height2;
  * {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }
  &:after {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }
  &:before {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }
  .fc-container {
    background: @color0;
    height: @height2;
    .fc-main {
      position: relative;
    }
  }
  .center-container {
    border-left: 1px solid @color6;
    border-right: 1px solid @color6;
    .btn-bar {
      background-color: @color0;
      border-bottom: 2px solid @color3;
      font-size: 18px;
      height: @height3 !important;
      line-height: @height3;
      padding: 0 10px;
      text-align: right;
      .svg-icon {
        font-size: 16px;
        margin-right: 5px;
      }
    }
  }
  .components {
    height: @height2;
    padding: 8px 0;
    width: 100%;
    .widget-cate {
      font-size: 13px;
      padding: 8px 12px;
    }
    ul {
      margin: 0;
      overflow: hidden;
      padding: 0 10px 10px;
      position: relative;
    }
    .form-edit-widget-label {
      border: 1px solid @color4;
      display: block;
      float: left;
      font-size: 12px;
      left: 0;
      line-height: 26px;
      margin: 1%;
      overflow: hidden;
      position: relative;
      text-overflow: ellipsis;
      white-space: nowrap;
      min-width: 100px;
      text-align: center;
      &:hover {
        border: 1px dashed@primary-color;
      }
      &:hover>a {
        color:@primary-color;
      }
    }
    .form-edit-widget-label>a {
      background: @color4;
      border: 1px solid @color4;
      color: #333333;
      cursor: move;
      display: block;
      padding: 0 5px;
      .svg-icon {
        display: inline-block;
        font-size: 14px;
        //margin-left: 8px;
        margin-right: 6px;
        vertical-align: middle;
      }
      span {
        display: inline-block;
        vertical-align: middle;
      }
    }
  }
  .widget-form-container {
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    overflow: auto;
    .widget-form-list {
      background: @color0;
      border: 1px dashed #999999;
      margin: 10px;
      min-height: calc(100vh - 65px);
      .widget-item-container {
        position: relative;
        .widget-view-action {
          background:@primary-color;
          bottom: -2px;
          height: @height4;
          line-height: @height4;
          position: absolute;
          right: 0;
          z-index: 10;
          .svg-icon {
            color: @color0;
            cursor: pointer;
            font-size: 14px;
            margin: 0 5px;
          }
        }
        .widget-view-drag {
          background:@primary-color;
          height: @height4;
          left: 0;
          line-height: @height4;
          position: absolute;
          top: -2px;
          z-index: 10;
          .svg-icon {
            color: @color0;
            cursor: move;
            font-size: 14px;
            margin: 0 5px;
          }
        }
      }
      .widget-col-list {
        background: @color0;
        border: 1px dashed @color8;
        min-height: 50px;
        height: auto;
      }
      .widget-view {
        background-color: rgba(236,245,255,0.3);
        border: 1px dashed rgba(170,170,170,0.7);
        margin: 2px;
        //padding-bottom: 18px;
        position: relative;
        .widget-view-description {
          color: #909399;
          font-size: 13px;
          height: 15px;
          line-height: 15px;
          margin-top: 6px;
        }
        &:after {
          bottom: 0;
          display: block;
          left: 0;
          position: absolute;
          right: 0;
          top: 0;
        }
        &:hover {
          background: @primary-background-color;
          outline-offset: 0;
          outline: 1px solid@primary-color;
          .widget-view-drag {
            display: block;
          }
        }
        &:hover.active {
          border: 1px solid@primary-color;
          outline-offset: 0;
          outline: 2px solid@primary-color;
        }
      }
      .widget-view.active {
        border: 1px solid@primary-color;
        outline: 2px solid@primary-color;
      }
      .widget-view.ghost {
        background: @color1;
        border: 2px solid @color1;
        box-sizing: border-box;
        content: '';
        font-size: 0;
        height: @height8;
        outline-width: 0;
        overflow: hidden;
        padding: 0;
      }
      .widget-col {
        background-color: rgba(253,246,236,0.3);
        padding: 5px;
        &:hover {
          background: #fdf6ec;
          outline-offset: 0px;
          outline: 1px solid @color2;
        }
        &:hover.active {
          border: 1px solid @color2;
          outline-offset: 0;
          outline: 2px solid @color2;
        }
        .widget-view-action.widget-col-action {
          background: @color2;
          bottom: -2px;
          height: @height4;
          line-height: @height4;
          position: absolute;
          right: -2px;
          z-index: 10;
          .svg-icon {
            color: @color0;
            cursor: move;
            font-size: 14px;
            margin: 0 5px;
          }
          .svg-icon.delete{
            cursor: pointer;
          }
        }
        .widget-view-drag.widget-col-drag {
          background: @color2;
          height: @height4;
          left: -2px;
          line-height: @height4;
          position: absolute;
          top: -2px;
          z-index: 10;
          .svg-icon {
            color: @color0;
            cursor: move;
            font-size: 14px;
            margin: 0 5px;
          }
        }
        &:after{
            display: none;
        }
      }
      .widget-col.active {
        border: 1px solid @color2;
        outline: 2px solid @color2;
      }
      .widget-col.ghost {
        background: @color1;
        border: 2px solid @color1;
        box-sizing: border-box;
        content: '';
        font-size: 0;
        height: @height8;
        outline-width: 0;
        overflow: hidden;
        padding: 0;
      }
      .ghost {
        background: @color1;
        border: 2px solid @color1;
        box-sizing: border-box;
        content: '';
        font-size: 0;
        height: @height8;
        outline-width: 0;
        overflow: hidden;
        padding: 0;
      }
    }
    .n-form--inline .widget-form-list{
      width: 100%;
      display: inline-flex;
      align-items: flex-start;
      align-content: space-around;
    }
    .ghost {
      background: @color1;
      border: 2px solid @color1;
      position: relative;
      &:after {
          background: @color1;
      }
    }
    li.ghost {
      font-size: 0;
      height: 5px;
      list-style: none;
      overflow: hidden;
    }
  }
  .widget-config-container {
    position: relative;
    .config-tab {
      cursor: pointer;
      display: inline-block;
      font-size: 14px;
      font-weight: 500;
      height: 41px;
      line-height: 41px;
      position: relative;
      text-align: center;
      width: 145px;
    }
    .config-tab.active {
      border-bottom: 2px solid@primary-color;
    }
    .config-content {
      background: @color0;
      overflow: auto;
      padding: 10px;
      h4 {
        border-bottom: 1px solid @color5;
        padding-bottom: 10px;
      }
      .label {
        font-size: 14px;
        font-weight: 500;
        margin: 0 5px;
        &:first-child {
          margin-left: 0;
        }
      }
      .drag-item {
        cursor: move;
        font-size: 16px;
        margin: 0 5px;
      }
    }
    .ghost {
      background: @color0;
      border: 1px dashed@primary-color;
      &:after{
          background: @color0;
          bottom: 0;
          content: '';
          display: block;
          left: 0;
          position: absolute;
          right: 0;
          top: 0;
        }
    }
    ul {
      margin: 0;
      padding: 0;
    }
    li.ghost {
      display: block;
      font-size: 0;
      list-style: none;
      position: relative;
    }
  }
  .form-empty {
    color: @color8;
    font-size: 20px;
    left: 50%;
    margin-left: -150px;
    position: absolute;
    text-align: center;
    top: 200px;
    width: 300px;
  }
  .widget-empty {
    background-position: 50%;
  }
}
.fc-form-item-block{
  .n-form-item-blank{
    display: block !important;
  }
}
.code-bord{
  color: #7b7979;
  background: #e8e8e8;
  font-size: 16px;
  padding-left: 5px;
}
